import type {Query} from "@/interface/Query";
import request from "@/common/Ask";
import type {Page} from "@/interface/Page";
import type { Repair } from "@/interface/Repair";
import type {SendOrdersVo} from "@/interface/SendOrdersVo";

export async function listApi( data : Query ) {
    return request<Page<Repair>>({
        url: "/repair/list",
        method: "post",
        data: data
    });
}

export async function assignApi( data : SendOrdersVo ) {
    return request({
        url: "/repair/assign",
        method: "post",
        data: data
    });
}

export async function removeApi( data : string[] ) {
    return request({
        url: "/repair/remove",
        method: "delete",
        data: data
    });
}

export async function changeStatusApi( data : Repair ) {
    return request({
        url: "/repair/changeStatus",
        method: "post",
        data: data
    });
}
